package com.you.atlas.biz.member.service.impl;

import com.you.atlas.biz.member.service.FollowQueryService;
import com.you.common.ibatis.data.DataList;
import com.you.member.dal.dao.FollowDAO;


public class FollowQueryServiceImpl implements FollowQueryService {

    private FollowDAO followDAO;

    public void setFollowDAO(FollowDAO followDAO) {
        this.followDAO = followDAO;
    }

    @Override
    public Long countFans(Long memberId) {
        return followDAO.countFans(memberId);
    }

    @Override
    public Long countFollow(Long memberId) {
        return followDAO.countFollow(memberId);
    }

    @Override
    public boolean isFollow(Long masterMemberId, Long fansMemberId) {
        return followDAO.findByMemberId(masterMemberId, fansMemberId) != null;
    }

    @Override
    public DataList queryFans(Long memberId) {
        return followDAO.queryFans(0, 2000, memberId);
    }

    @Override
    public DataList queryFollow(Long memberId) {
        return followDAO.queryFollow(0, 2000, memberId);
    }

}
